Analises .{tabset}
Analise 2023
banco = read.csv("dados_shiny/2023.csv")
banco = banco |> select(codigo, data_dia, data_mes, data_ano, regiao, uf, estacao, missing)
banco$aux = (banco$missing == 1)
vet_ordem = banco |> group_by(estacao, data_ano) |> summarise(missing = mean(missing),
codigo = unique(codigo),
data_ano = unique(data_ano),
regiao = unique(regiao),
estaco = unique(estacao),
uf = unique(uf),
prop_100 = mean(aux))
## Warning: Returning more (or less) than 1 row per `summarise()` group was deprecated in
## dplyr 1.1.0.
## ℹ Please use `reframe()` instead.
## ℹ When switching from `summarise()` to `reframe()`, remember that `reframe()`
## always returns an ungrouped data frame and adjust accordingly.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## `summarise()` has grouped output by 'estacao', 'data_ano'. You can override
## using the `.groups` argument.
vet_ordem = vet_ordem[order(vet_ordem$missing, decreasing = F), ]
banco$estacao = factor(banco$estacao, levels = unique(vet_ordem$estacao))
fig = ggplot(data = banco, aes(x = missing, y = estacao, col = regiao))+
geom_point()+
geom_point(data = vet_ordem, aes(x = missing, y = estacao), inherit.aes = F, shape = 17, size = 4, alpha = 0.6)+
geom_text(data = vet_ordem, aes(x = missing, y = estacao, label = sprintf("%.1f%%", prop_100 * 100),
inherit.aes = FALSE, nudge_x = 0.1), size = 2.7, col = "black") + geom_vline(xintercept = 1)
## Warning in geom_text(data = vet_ordem, aes(x = missing, y = estacao, label =
## sprintf("%.1f%%", : Ignoring unknown aesthetics: inherit.aes
fig

Analise 2024
banco = read.csv("dados_shiny/2024.csv")
banco = banco |> select(codigo, data_dia, data_mes, data_ano, regiao, uf, estacao, missing)
banco$aux = (banco$missing == 1)
vet_ordem = banco |> group_by(estacao, data_ano) |> reframe(missing = mean(missing),
codigo = unique(codigo),
data_ano = unique(data_ano),
regiao = unique(regiao),
estaco = unique(estacao),
uf = unique(uf),
prop_100 = mean(aux))
vet_ordem = vet_ordem[order(vet_ordem$missing, decreasing = F), ]
banco$estacao = factor(banco$estacao, levels = unique(vet_ordem$estacao))
fig = ggplot(data = banco, aes(x = missing, y = estacao, col = regiao))+
geom_point()+
geom_point(data = vet_ordem, aes(x = missing, y = estacao), inherit.aes = F, shape = 17, size = 4, alpha = 0.6)+
geom_text(data = vet_ordem, aes(x = missing, y = estacao, label = sprintf("%.1f%%", prop_100 * 100),
inherit.aes = FALSE, nudge_x = 0.1), size = 2.7, col = "black") + geom_vline(xintercept = 1)
## Warning in geom_text(data = vet_ordem, aes(x = missing, y = estacao, label =
## sprintf("%.1f%%", : Ignoring unknown aesthetics: inherit.aes
fig

Analise 2025
banco = read.csv("dados_shiny/2025.csv")
banco = banco |> select(codigo, data_dia, data_mes, data_ano, regiao, uf, estacao, missing)
banco$aux = (banco$missing == 1)
vet_ordem = banco |> group_by(estacao, data_ano) |> summarise(missing = mean(missing),
codigo = unique(codigo),
data_ano = unique(data_ano),
regiao = unique(regiao),
estaco = unique(estacao),
uf = unique(uf),
prop_100 = mean(aux))
## Warning: Returning more (or less) than 1 row per `summarise()` group was deprecated in
## dplyr 1.1.0.
## ℹ Please use `reframe()` instead.
## ℹ When switching from `summarise()` to `reframe()`, remember that `reframe()`
## always returns an ungrouped data frame and adjust accordingly.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## `summarise()` has grouped output by 'estacao', 'data_ano'. You can override
## using the `.groups` argument.
vet_ordem = vet_ordem[order(vet_ordem$missing, decreasing = F), ]
banco$estacao = factor(banco$estacao, levels = unique(vet_ordem$estacao))
fig = ggplot(data = banco, aes(x = missing, y = estacao, col = regiao))+
geom_point()+
geom_point(data = vet_ordem, aes(x = missing, y = estacao), inherit.aes = F, shape = 17, size = 4, alpha = 0.6)+
geom_text(data = vet_ordem, aes(x = missing, y = estacao, label = sprintf("%.1f%%", prop_100 * 100),
inherit.aes = FALSE, nudge_x = 0.1), size = 2.7, col = "black") + geom_vline(xintercept = 1)
## Warning in geom_text(data = vet_ordem, aes(x = missing, y = estacao, label =
## sprintf("%.1f%%", : Ignoring unknown aesthetics: inherit.aes
fig
